package com.demo.controller;

import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by andy on 2017/7/20.
 */
@Controller
@RequestMapping(value = "/hello")

public class HelloWorld {
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String printHello(ModelMap model) {
        model.addAttribute("msg", "sadfasdfadf");
        model.addAttribute("name", "jiangbin");
        return "hello";
    }
}
